Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false -ve on else with single line binary or chained call #2063

Conversation

atulgpt
Copy link
Contributor

@atulgpt atulgpt commented May 30, 2023

Description

Only ignore the chain or binary call when the parent of that call is if(when present inside else if). This solves the false -ve on those cases
This fixes #2057

Checklist

  • PR description added
  • tests are added
  • KtLint has been applied on source code itself and violations are fixed
  • documentation is updated: NA as no new rule is added
  • CHANGELOG.md is updated

Copy link
Collaborator

@paul-dingemans paul-dingemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is looking good and examples in the unit tests are clear.

Update the naming of dummy code in TC to be consistent
@paul-dingemans paul-dingemans merged commit 8c00f6c into pinterest:master Jun 3, 2023
@paul-dingemans
Copy link
Collaborator

Tnx for the contribution Atul.

@paul-dingemans paul-dingemans added this to the 0.50.0 milestone Jun 3, 2023
@atulgpt atulgpt deleted the fixes/2057/multiline-if-with-chained-call branch June 3, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No braces added in multiline-if-else with dot qualified expression in else branche
2 participants